﻿@model F2B.Orchard.Schedule.ViewModels.EditScheduleSettingsViewModel
            
@{
    Style.Require("jQuery.DateTimePicker");
    
    Script.Require("jQuery").AtFoot();
    Script.Require("jQuery.DateTimePicker").AtFoot();

    var startTimeId = Html.FieldIdFor(m => m.StartTime);
    var durationId = Html.FieldIdFor(m => m.Duration);
}

<fieldset>
    <legend>@T("Schedule Defaults")</legend>
    @Html.EditorFor(m => m.StartTime)
    <label class="fortextbox" for="@Html.FieldIdFor(m => m.StartTime)">@T("Default starting time for new schedules")</label>
    @Html.EditorFor(m => m.Duration)
    <label class="fortextbox" for="@Html.FieldIdFor(m => m.Duration)">@T("Default duration for new schedules")</label>
</fieldset>

@using (Script.Foot()) {
    <script type="text/javascript">
        $('#@startTimeId').datetimepicker({
            datepicker: false,
            format: 'g:i A',
            formatTime: 'g:i A',
            step: 15
        });
        $('#@durationId').datetimepicker({
            datepicker: false,
            format: 'H:i',
            formatTime: 'H:i',
            step: 15
        });
    </script>
}